package com.msconfig.device;

/*
 * author: caojunhao
 * date  : 2020/7/20
 * desc  :所有需要发送的命令的集合
 */

import android.app.Application;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;

import com.geo.msconfig.R;
import com.msconfig.MyApplication;

import java.util.ArrayList;

public class GetSendCommandList {

    //GETALL
    public static ArrayList<TagSendCommand> getGetAllCommandList(){
        ArrayList<TagSendCommand> sendCommandList= new ArrayList<>();
        TagSendCommand sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_all);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_all);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = 9;
        sendCommand.strFunction = MyApplication.getGlobalContext().getString(R.string.function_get_all);
        sendCommandList.add(sendCommand);
        return sendCommandList;
    }

    //电池电量
    public static ArrayList<TagSendCommand> getPowerLevel(){
        ArrayList<TagSendCommand> sendCommandList = new ArrayList<>();
        TagSendCommand sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_power_level);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_power_level);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = 9;
        sendCommand.strFunction = MyApplication.getGlobalContext().getString(R.string.function_get_power_level);
        sendCommandList.add(sendCommand);
        return sendCommandList;
    }

    //数据回传
    public static ArrayList<TagSendCommand> getRawResultStatus(){
        ArrayList<TagSendCommand> sendCommandList = new ArrayList<>();
        TagSendCommand sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_raw_result_status);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_raw_result_status);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = 9;
        sendCommand.strFunction = MyApplication.getGlobalContext().getString(R.string.function_get_raw_result_status);
        sendCommandList.add(sendCommand);
        return sendCommandList;
    }

    //GPRS
    public static ArrayList<TagSendCommand> getGprsCommandList(String apnName, String apnUser, String apnPass, int mEnableNet, int mEnableMessage) {
        ArrayList<TagSendCommand> sendCommandList = new ArrayList<>();
        TagSendCommand sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_set_network_enable,mEnableNet);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_set_network_enable);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_set_network_enable);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_set_network_apn,apnName);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_set_network_apn);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_set_network_apn);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_set_network_apn_user,apnUser);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_set_network_apn_user);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction = MyApplication.getGlobalContext().getString(R.string.function_set_network_apn_user);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_set_network_apn_pass,apnPass);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_set_network_apn_pass);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction = MyApplication.getGlobalContext().getString(R.string.function_set_network_apn_pass);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_set_network_sms_wakeup,mEnableMessage);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_set_network_sms_wakeup);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction = MyApplication.getGlobalContext().getString(R.string.function_set_network_sms_wakeup);
        sendCommandList.add(sendCommand);

        return sendCommandList;

    }

    //wifi
    public static ArrayList<TagSendCommand> getWifiCommandList(String mode, String ssid, String password, int dhcp, String ipAdress, String subnetLength, String defaultGateway, String dns1, String dns2, int band5g, String prefix, String apName) {

        ArrayList<TagSendCommand> sendCommandList = new ArrayList<>();
        TagSendCommand sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_mode,mode);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_mode);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_mode);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_ssid,ssid);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_ssid);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_ssid);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_pass,password);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_pass);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_pass);
        sendCommandList.add(sendCommand);


        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_dhcp,dhcp);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_dhcp);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_dhcp);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_ip,ipAdress);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_ip);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_ip);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_mask,subnetLength);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_mask);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_mask);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_gateway,defaultGateway);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_gateway);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_gateway);
        sendCommandList.add(sendCommand);


        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_dns1,dns1);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_dns1);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_dns1);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_dns2,dns2);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_dns2);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_dns2);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_band5g,band5g);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_band5g);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_band5g);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_prefix,prefix);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_prefix);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_prefix);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_ap_pass,apName);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_ap_pass);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_ap_pass);
        sendCommandList.add(sendCommand);

        return sendCommandList;

    }


    //other
    public static ArrayList<TagSendCommand> getOtherCommandList(int zoneType,int type, String serverAdress, String serverPort) {
        ArrayList<TagSendCommand> sendCommandList = new ArrayList<>();
        TagSendCommand sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_wifi_zone,zoneType);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_wifi_zone);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_wifi_zone);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_raw_back_enable,type);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_raw_back_enable);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_raw_back_enable);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_raw_back_addr,serverAdress);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_raw_back_addr);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_raw_back_addr);
        sendCommandList.add(sendCommand);


        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_raw_back_port,serverPort);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_raw_back_port);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_raw_back_port);
        sendCommandList.add(sendCommand);

        return sendCommandList;

    }

    //转换
    public static ArrayList<TagSendCommand> getTransformationCommandList(int mStartOutput, String mEllipsoidName, String mEllipsoidLongHalfshaft, String mEllipsoidFlatteningInverse, int projectionMode, String mCentralMeridian, String mProjectionScale, String mNorgaConstant, String mEastgaConstant, String mProjectionHeight, String mBaseLatitude, String mtBaseLogitude, String mParallel1, String mParallel2, int mUseSevenParameter, String mSevenXTranslation, String mSevenYTranslation, String mSevenZTranslation, String mSevenXRotate, String mSevenYRotate, String mSevenZRotate, String mSevenScale, int mUseFourParameter, String mFourXTranslation, String mFourYTranslation, String mFourRotate, String mFourScale) {

        ArrayList<TagSendCommand> sendCommandList = new ArrayList<>();
        TagSendCommand sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_gps_coordcvt_enabled,mStartOutput);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_gps_coordcvt_enabled);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_gps_coordcvt_enabled);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_gps_coordcvt_dst_datum,mEllipsoidName,mEllipsoidLongHalfshaft,mEllipsoidFlatteningInverse);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_gps_coordcvt_dst_datum);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_gps_coordcvt_dst_datum);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_gps_coordcvt_proj_param,
                projectionMode,mCentralMeridian,mProjectionScale,mNorgaConstant,
                mEastgaConstant,mProjectionHeight,mBaseLatitude, mtBaseLogitude,mParallel1,mParallel2);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_gps_coordcvt_proj_param);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_gps_coordcvt_proj_param);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_gps_coordcvt_seven_param,mUseSevenParameter,mSevenXTranslation
                ,mSevenYTranslation,mSevenZTranslation,mSevenXRotate, mSevenYRotate,mSevenZRotate,mSevenScale);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_gps_coordcvt_seven_param);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_gps_coordcvt_seven_param);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_gps_coordcvt_four_param,mUseFourParameter,mFourXTranslation,mFourYTranslation,
                mFourRotate,mFourScale);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_gps_coordcvt_four_param);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_gps_coordcvt_four_param);
        sendCommandList.add(sendCommand);

        return sendCommandList;
    }

    //测站
    public static ArrayList<TagSendCommand> getSurveyStationCommandList(int interval, String dataLink, String mSurveyName, String mFirstIp, String mFirstPort, int doubleStation, String mSecondIp, String mSecondPort, String mResultIp, String mResultPort, String powerOnValue, int externalSensor, int earthDisaster, int type, String mServerAdress, String mServerPort) {
        ArrayList<TagSendCommand> sendCommandList = new ArrayList<>();
        TagSendCommand sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_raw_name,mSurveyName);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_raw_name);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_raw_name);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_raw_interval,interval);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_raw_interval);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_raw_interval);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_cur_datalink,dataLink);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_cur_datalink);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_cur_datalink);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_raw_ip,mFirstIp);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_raw_ip);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_raw_ip);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_raw_port,mFirstPort);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_raw_port);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_raw_port);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_second_base,doubleStation);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_second_base);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_second_base);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_second_ip,mSecondIp);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_second_ip);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_second_ip);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_second_port,mSecondPort);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_second_port);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_second_port);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_result_ip,mResultIp);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_result_ip);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_result_ip);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_result_port,mResultPort);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_result_port);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_result_port);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_schduler,powerOnValue);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_schduler);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_schduler);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_ext_sensor,externalSensor);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_ext_sensor);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_ext_sensor);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_device_dz_iot,earthDisaster);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_device_dz_iot);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_device_dz_iot);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_raw_back_enable,type);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_raw_back_enable);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_raw_back_enable);
        sendCommandList.add(sendCommand);

        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_raw_back_addr,mServerAdress);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_raw_back_addr);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_raw_back_addr);
        sendCommandList.add(sendCommand);


        sendCommand = new TagSendCommand();
        sendCommand.strCommand = MyApplication.getGlobalContext().getString(R.string.command_get_raw_back_port,mServerPort);
        sendCommand.strAnswerHead = MyApplication.getGlobalContext().getString(R.string.answerhead_get_raw_back_port);
        sendCommand.nInterval = 3;
        sendCommand.nTimeOut = -1;
        sendCommand.strFunction =MyApplication.getGlobalContext().getString(R.string.function_get_raw_back_port);
        sendCommandList.add(sendCommand);

        return sendCommandList;
    }
}
